<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        img{
            width: 50px;
            /*垂直对齐方式
            baseline：基线对齐
            top     ：上对齐
            middle  ：中间对齐
            bottom  ：下对齐
            */
            vertical-align: baseline;
        }
        #d1{
            width: 100px;
            height: 50px;
            background-color: red;
            position:absolute;
            /*z:显示元素显示层级  值越大越靠钱*/
            z-index: 2;
        }
        #d2{
            width: 50px;
            height: 100px;
            background-color: green;
            position:absolute;
            z-index: 3;
        }
    </style>
</head>
<body>
<div id="d1"></div>
<div id="d2"></div>
<input type="text"><img src="../b.jpg" alt="">
</body>
</html>